<?php
/**
 * Created by PhpStorm.
 * User: wzy12
 * Date: 2018/9/20
 * Time: 17:11
 */

namespace app\admin\validate;


use think\Validate;

class GoodsCate extends Validate
{
    protected $rule = [
        'id'  =>  'require|number',
        'sort|排序'  =>  'require|number',
        'pid|父级id' => 'require|number',
        '__token__' => 'token|require',
        'cate_name|分类名称' =>  'require',
    ];

    protected $message = [
        '__token__.require'  =>  '请不要进行非法操作',
    ];

    protected $scene = [
        'sort'  =>  ['__token__', 'id', 'sort'],
        'status' => ['id', 'status|状态' => 'require|number'],
        'form' => ['pid', '__token__', 'cate_name'],
        'del' => ['__token__']
    ];
}